package conf;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public class YamlConfigDo extends YamlDo implements ConfigDo{

    public YamlConfigDo(String filePath,String fileName) throws IOException {
        super(filePath,fileName);
    }
    public YamlConfigDo(String yamlString){
        super(yamlString);
    }

    @Override
    public List<Map<String,Object>> getNodeList(String name)
    {
        return getList(name);
    }

    @Override
    public Map<String,Object> getNode1(String name)
    {
        return getNode(name);
    }

    @Override
    public <T> String getNodeAttr(T t, String key) {
        Object object=((Map<String,Object>)t).get(key);
        return object==null?"":object.toString();
    }

    @Override
    public <T> String getNodeText(T t) {
        return t.toString();
    }

}
